package com.yequan.thread.base.reorder;

public class Run {

    public static void main(String[] args) {
        final ReorderClass reorderClass = new ReorderClass();
        for (int i = 0; i < 100000; i++) {
            Thread writeThread = new Thread(new Runnable() {
                @Override
                public void run() {
                    reorderClass.write();
                }
            });
            writeThread.start();


            Thread readThread = new Thread(new Runnable() {
                @Override
                public void run() {
                    reorderClass.read();
                }
            });
            readThread.start();

        }
    }

}
